package com.example.controller;

import com.example.pojo.User;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;

@Controller
public class UserController {

    @GetMapping("/pojo")
    public String testPojoBinding(User user){ // Spring MVC会自动将Form表单或者查询参数中的参数绑定user对象中
        System.out.println(user);

        return "/WEB-INF/jsp/index.jsp";
    }
}
